const TurndownService = require('turndown')
const test = require('ava')

const text = `
<blockquote>
  <p>I have folder with .ssh with all keys</p>
</blockquote>

<p>Those keys won&apos;t never been read, if you keep using an http(s) url.</p>

<p>You should use an ssh url, and first make sure that this works properly:</p>

<pre><code>ssh -Tv ssh://git@git.*****.org
</code></pre>

<p>(assuming the user account you need on the server side is &apos;<code>git</code>&apos;)</p>

<hr>

<p>Note that the <a href="http://guides.beanstalkapp.com/version-control/git-on-windows.html#openssh-tortoisegit" rel="nofollow noreferrer">section on SSH of this guide</a> is of interest here:</p>

<h2>you have installed TortoiseGIT</h2>

<p><img src="https://i.stack.imgur.com/OZdSs.png" alt="http://guides.beanstalkapp.com/version-control/git-on-windows/git-ssh-variable.png"></p>

<blockquote>
  <p>If you have ever installed TortoiseGit on the computer you&#x2019;re setting up your keys on, you may encounter problems.<br>
  <strong>TortiseGit creates an environment variable that configures Plink as your SSH keystore, which may conflict when you try to use Git and SSH</strong>.<br>
  No matter how you change your config or uninstall TortoiseGit, that environment variable persists and until you delete it, Git will not look to your regular <code>.ssh</code> directory to find the proper key.</p>

  <p>In our case environment variable looked like this: </p>
</blockquote>

<pre><code>GIT_SSH=c:\\Program Files\\Putty\\plink.exe.
</code></pre>

<ul>
<li>Windows XP: <code>Control Panel &#x2192; System Properties &#x2192; Advanced &#x2192; Environment variables</code></li>
<li>Windows 7: <code>Control Panel &#x2192; System &#x2192; Advanced system settings &#x2192; Environment variables</code></li>
</ul>
`

test('tomd', async (t) => {
    try {
        const turndownService = new TurndownService()
        const markdown = turndownService.turndown(text)
        t.true(markdown != null)
    } catch (err) {
        console.error(err)
    }
})

// > I have folder with .ssh with all keys

// Those keys won't never been read, if you keep using an http(s) url.

// You should use an ssh url, and first make sure that this works properly:

//     ssh -Tv ssh://git@git.*****.org


// (assuming the user account you need on the server side is '`git`')

// * * *

// Note that the [section on SSH of this guide](http://guides.beanstalkapp.com/version-control/git-on-windows.html#openssh-tortoisegit) is of interest here:

// you have installed TortoiseGIT
// ------------------------------

// ![http://guides.beanstalkapp.com/version-control/git-on-windows/git-ssh-variable.png](https://i.stack.imgur.com/OZdSs.png)

// > If you have ever installed TortoiseGit on the computer you’re setting up your keys on, you may encounter problems.
// > **TortiseGit creates an environment variable that configures Plink as your SSH keystore, which may conflict when you try to use Git and SSH**.
// > No matter how you change your config or uninstall TortoiseGit, that environment variable persists and until you delete it, Git will not look to your regular `.ssh` directory to find the proper key.
// >
// > In our case environment variable looked like this:

//     GIT_SSH=c:\Program Files\Putty\plink.exe.


// > Environment variables can be found here:

// *   Windows XP: `Control Panel → System Properties → Advanced → Environment variables`
// *   Windows 7: `Control Panel → System → Advanced system settings → Environment variables`
